/*
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using FarseerGames.FarseerPhysics.Dynamics;
using FarseerGames.FarseerPhysics.Collisions;

namespace Dragoon
{
    
    abstract class PhysicalModel : DrawableGameComponent
    {
        protected readonly IEffectProvider _fx;
        private readonly float _scale;
        protected readonly Geom _body;
        private bool _modelReskinned = false;
        private Model _model;

        public Geom PhysicsBody { get { return _body; } }

        protected static Random random = new Random();

        public PhysicalModel(Game game, Geom body, float scale)
            : base(game)
        {
            Visible = false;
            _fx = (IEffectProvider)game;
            _body = body;
            _scale = scale;
        }

        /// <summary>
        /// Setting the model makes the object visible
        /// </summary>
        protected Model Model
        {
            get
            {
                return _model;
            }
            set
            {
                _model = value;
                Visible = true;
            }
        }


        protected void ReskinModel()
        {
              foreach (ModelMesh m in Model.Meshes)
                  foreach (ModelMeshPart p in m.MeshParts)
                  {
                      p.Effect = _fx.DefaultEffect;
                      if (p.Effect == null)
                          throw new Exception("DefaultEffect is empty");
                  }
            _modelReskinned = true;
        }


        /// <summary>
        /// Called once before drawing starts
        /// </summary>
        /// <param name="fx"></param>
        protected abstract void PrepareEffect(Effect fx);


        public override void Draw(GameTime gameTime)
        {
            if (!_modelReskinned)
                ReskinModel();
            PrepareEffect(_fx.DefaultEffect);
            Matrix[] boneTransforms = new Matrix[_model.Bones.Count];
            _model.CopyAbsoluteBoneTransformsTo(boneTransforms);

            foreach (ModelMesh mesh in _model.Meshes)
            
            {
                
                foreach (Effect effect in mesh.Effects)
                {
                    _fx.SetWorld(
                       boneTransforms[mesh.ParentBone.Index]
                        * Matrix.CreateScale(_scale)
                        * Matrix.CreateTranslation(new Vector3(_body.Position.X,0,_body.Position.Y)));
                }
                mesh.Draw();
            }

        base.Draw(gameTime);
        }

    }
}
*/